package io.renren.modules.business.service.impl;

import io.renren.modules.business.dao.BusProjectTeamDao;
import io.renren.modules.business.entity.BusProjectTeamEntity;
import io.renren.modules.business.service.BusProjectTeamService;
import io.renren.modules.business.util.PageLastUtil;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;

@Service("busProjectTeamService")
public class BusProjectTeamServiceImpl extends ServiceImpl<BusProjectTeamDao, BusProjectTeamEntity> implements BusProjectTeamService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        String teamName = (String) params.get("teamName");
        List<BusProjectTeamEntity> list;
        if (!"".equals(teamName) && teamName.length()!=0) {
            //关键字查询
            list = baseMapper.descKeyTeam(teamName);
        }else {
            //查询列表
            list = baseMapper.descTeam();
        }
        return PageLastUtil.getProjectPageUtils(params, list);
    }

    @Override
    public List<BusProjectTeamEntity> selectList() {
        return baseMapper.descTeam();
    }
}